#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: count_it_by_threading.py 
@version:
@time: 2023/04/19 
"""
import time
from threading import Thread


def CountDown(n):
    while n > 0:
        n -= 1


n = 100000000

t1 = Thread(target=CountDown, args=[n // 4])
t2 = Thread(target=CountDown, args=[n // 4])
t3 = Thread(target=CountDown, args=[n // 4])
t4= Thread(target=CountDown, args=[n // 4])

start = time.perf_counter()
t1.start()
t2.start()
t3.start()
t4.start()
t1.join()
t2.join()
t3.join()
t4.join()
end = time.perf_counter()
print(end - start)
